Home > Use Cases > Retrieving Operation History

Retrieving Operation History

A sample SessionToken will be used throughout this use case.
The sample SessionToken will be: e65aedeb-a0e7-440c-8309-1cc0bcd920db

Base URLs are required depending on the version of VM Backup being used. <base_url> for each version is:

V8.x: http://localhost:35113/api

V9.0.x: http://localhost:36015/api

V9.1.x: http://localhost:36013/api/rest

Reports can be retrieved for local backups, offsite copies and restores. The default behaviour when retrieving a report is to retrieve the last operation. Irrelevant whether it was a successful or a failed operation. More parameters can be specified to retrieve more specific information, such as retrieving more than 1 item, retrieving only successful or failed items. A date range can also be provided, which would return data which falls between two specific dates.

The following examples illustrate how to retrieve such information for backups, but the same API calls for offsite copies and restores are also available. The only parameter which must be retrieved from another call is the AltaroVirtualMachineRef. Its retrieval has been thoroughly explained further above.

 

GET request to retrieve last backup operation, irrelevant of its result:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e

 

GET request to retrieve last successful backup operation:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/1

 

GET request to retrieve last failed backup operation:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/2

 

GET request to retrieve last 5 successful backup operations:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/1/5

 

GET request to retrieve last 5 failed backup operations:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/2/5

 

GET request to retrieve last 10 backup operations between 01/10/2015 till 31/10/2015, irrelevant of their result:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/0/10/2015-10-01-00-00-00/2015-10-31-23-59-59

 

GET request to retrieve all erroneous backup operations between 01/10/2015 till 31/10/2015, irrelevant of their result, assuming that less than 1000 backups have been taken between these dates:

<base_url>/reports/backup/e65aedeb-a0e7-440c-8309-1cc0bcd920db/ba2e9cdc-0d85-48e6-8db7-a45c5a40819e/2/1000/2015-10-01-00-00-00/2015-10-31-23-59-59

 

Note: A full list of available API commands can be found here